﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;

namespace WindowsFormsApplication7
{
    public partial class Form1 : Form
    {
       
        public Form1()
        {
            InitializeComponent();
        }
        
        public void button1_Click(object sender, EventArgs e)
        {
            var location = Environment.GetEnvironmentVariable("PROGRAMFILES(X86)") ?? Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
            try
            {
                Random random = new Random();
                int randomNumber = random.Next(0, 10);
                int number0 = random.Next(0, 5);
                int number1 = random.Next(5, 10);
                int number2 = random.Next(0, 5);
                int number3 = random.Next(5, 10);
                int number4 = random.Next(0, 5);
                int number5 = random.Next(5, 10);
                int number6 = random.Next(0, 5);
                int number7 = random.Next(5, 10);

                pictureBox1.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox2.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox3.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox4.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox5.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox6.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox7.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox8.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox9.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox10.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox10.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox11.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox11.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox12.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox12.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox13.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox13.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox14.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox14.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox15.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox15.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox16.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox16.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox17.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox17.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox18.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox18.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox19.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox19.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox20.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox20.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox21.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox21.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox22.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox22.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox23.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox23.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox24.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox24.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox25.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox25.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox26.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox26.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox27.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox27.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox28.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox28.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox29.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox29.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox30.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox30.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox31.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox31.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox32.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox32.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox33.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox33.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox34.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox34.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox35.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox35.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox36.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox36.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox37.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox37.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox38.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox38.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox39.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox39.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox40.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox40.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox41.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox41.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox42.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox42.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox43.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox43.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox44.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox44.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox45.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox45.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox46.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox46.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox47.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox47.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox48.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox48.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox49.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox49.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox50.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox50.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox51.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox51.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox52.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox52.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox53.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox53.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox54.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox54.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox55.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox55.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox56.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox56.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox57.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox57.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox58.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox58.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox59.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox59.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox60.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox60.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox61.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox61.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox62.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox62.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox63.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox63.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox64.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox64.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox65.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox65.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox66.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox66.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox67.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox67.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox68.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox68.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox69.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox69.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox70.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox70.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox71.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox71.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox72.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox72.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox73.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox73.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox74.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox74.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox75.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox75.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox76.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox76.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox77.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox77.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox78.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox78.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox79.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox79.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox80.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox80.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox81.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox81.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox82.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox82.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox83.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox83.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox84.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox84.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox85.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox85.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox86.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox86.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox87.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox87.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox88.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox88.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox89.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox89.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox90.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox90.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;

                pictureBox91.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox91.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox92.Load(location + @"\Mindreader\" + (number2) + ".png");
                pictureBox92.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox93.Load(location + @"\Mindreader\" + (number1) + ".png");
                pictureBox93.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox94.Load(location + @"\Mindreader\" + (number0) + ".png");
                pictureBox94.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox95.Load(location + @"\Mindreader\" + (number7) + ".png");
                pictureBox95.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox96.Load(location + @"\Mindreader\" + (number4) + ".png");
                pictureBox96.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox97.Load(location + @"\Mindreader\" + (number3) + ".png");
                pictureBox97.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox98.Load(location + @"\Mindreader\" + (number6) + ".png");
                pictureBox98.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox99.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox99.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox100.Load(location + @"\Mindreader\" + (number5) + ".png");
                pictureBox100.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;



                pictureBox101.Load(location + @"\Mindreader\" + randomNumber + ".png");
                pictureBox101.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pictureBox101.Visible = false;
            }
            catch
            {
                var dir = location + @"\Mindreader";  // folder location

                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }
                    MessageBox.Show("Please copy mindreader folder's image into" + location + @"\Mindreader\ folder");
            }        
        }

        public void button2_Click(object sender, EventArgs e)
        {

            pictureBox101.Visible = true;
           

        }

        private void pictureBox101_Click(object sender, EventArgs e)
        {

        }

        private void label101_Click(object sender, EventArgs e)
        {

        }
    }
}
